#ifndef UI_SETTING_PAGE_H
#define UI_SETTING_PAGE_H

#include "sys_port.h"
#include "page_base.h"
#include "page_manager.h"

#include "ui_base_page.h"
#include "midea_collection_view.h"
#include "midea_collection_dynamic.h"
#include "../base_scroll_ui/midea_flex.h"
#include "../base_scroll_ui/midea_base_scroll_tool.h"
#include "../base_scroll_ui/midea_base_scroll_cell.h"

typedef struct 
{
    int        index;
    
    int        msg_num;
    bool       is_msg;
    bool       is_voice;
    bool       is_sleep;
    bool       is_auto_bri;
    
    lv_obj_t * bg;

    lv_obj_t * img_point1;
    lv_obj_t * img_point2;

    lv_obj_t * bg_msg;
    lv_obj_t * bg_voice;
    lv_obj_t * bg_sleep;
    lv_obj_t * bg_bri;  

    lv_obj_t * img_msg;
    lv_obj_t * img_voice;
    lv_obj_t * img_sleep;
    lv_obj_t * img_bri;

    lv_obj_t * lab_msg;
    lv_obj_t * lab_voice;
    lv_obj_t * lab_sleep;
    lv_obj_t * lab_bri; 

    lv_obj_t * bg_msg_num;
    lv_obj_t * lab_msg_num;

    lv_obj_t * bar_bri;
    lv_obj_t * bar_bri_img;

    lv_obj_t * bar_vol;
    lv_obj_t * bar_vol_img;

    lv_timer_t * auto_light_timer;  
    int target_light;               
    int current_light;            
    
    lv_obj_t*   setting_page;
    midea_collection_view* setting_collection;

    lv_timer_t* touch_timer;

} ui_widget_setting_t;

void ui_init_setting_page_src(lv_obj_t *superview);

static void on_page_setting_view_did_load(page_base_t* self);

page_vtable_t* lv_page_setting_create(void);

#endif
